names =['Michael','bob','Tracy']
for name in names:
      print(name)
sum=0
for x in [1,2,3,4,5,6,7,8,9,10]:
      sum=sum+x
print(sum)
#range函数
print(list(range(5)))
rlist =list(range(10))
print (rlist)

sum=0
for x in range(101):
      sum=sum+x
print(sum)
L = ['Bart', 'Lisa', 'Adam']
for l in L:
      print('Hello,%s!'%l)

# 计算1+2+3+...+100:
sum = 0
n = 1
while n <= 100:
    sum = sum + n
    n = n + 1
print(sum)

# 计算1x2x3x...x100:
acc = 1
n = 1
while n <= 100:
    acc = acc * n
    n = n + 1
print(acc)
